/* 
 * Plugin jquery permettant de crée un moniteur dans la barre des menu
 * 
 * 
 */

(function($) {
    $.fn.monitor = function(){
        
    };
    
    // Ajout d'un nouveau moniteur dans le menu
    $.fn.monitor_add_menu = function(monitor_name, monitor_id) {
        var defaults = {};
                        
        var options = $.extend(defaults, options);
                        
        return this.each(function(){
            obj = $(this);
            
            //Ajout du nouveua moniteur dans le menu
            obj.append(
                '<li m-id="'+monitor_id+'" class="li_grey monitor_page">'+
                '<a href="#'+monitor_name+'" class="button-desktop-activate" style="float:left;">' +
                '<div style="width:176px;position:relative;float:left">' +
                '<i class="icon-ok icon-white"></i> ' +
                '<span style="width:500px;"> '+monitor_name+'</span></div>' +
                '<div style="margin-top:-3px;float:right;position:relative">' +
                '<div class="btn" style="margin:3px 1px -1px 1px;padding:1px;"><i class="icon-pencil icon-black"></i></div>' +
                '<div class="btn" style="margin:3px 1px -1px 5px;padding:1px;"><i class="icon-trash icon-black"></i></div>' +
                '</div></a></li>'
                );
        });
    };

    //Ajout d'un nouveau monitor dans le layout
    $.fn.monitor_add_layout = function(monitor_name, monitor_id){
        var defaults = {};
                        
        return this.each(function(){
            obj = $(this);
        
            //Insertion du layout
            obj.append(
                '<div class="container_page" id="'+monitor_name+'" m-id="'+monitor_id+'">' +
                    '<div class="pane ui-layout-center" style="padding:2px;">' +
                        '<div class="widget_zone" style="width:100%;height:100%">' +
                            '<div class="pane ui-layout-west" style="background-color:#F5F5F5;">' +
                                '<div class="menu_left">' +
                                    '<ul class="nav nav-list">' +
                                        '<li class="nav-header">Add Widgets</li>' +
                                        '<li class="active"><a href="#"><i class="icon-white icon-home"></i> Odds comparator</a></li>' +
                                        '<li><a href="#"><i class="icon-book"></i> Betslip</a></li>' +
                                        '<li><a href="#"><i class="icon-pencil"></i> Surebets</a></li>' +
                                        '<li><a href="#"><i class="icon-pencil"></i> Middles</a></li>' +
                                        '<li><a href="#"><i class="icon-pencil"></i> Negative Middles</a></li>' +
                                        '<li class="nav-header">Negative Middles</li>' +
                                        '<li><a href="#"><i class="icon-user"></i> Profile</a></li>' +
                                        '<li><a href="#"><i class="icon-cog"></i> Settings</a></li>' +
                                        '<li class="divider"></li>' +
                                        '<li><a href="#"><i class="icon-flag"></i> Help</a></li></ul>'+
                                '</div>'+
                            '</div>'+
                        '</div>'+
                    '</div>'+
                '</div>'
                );
                    
            
        });
    }
})(jQuery);

